/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #f0f2f5;
}

#app {
  height: 100%;
}

/* RuoYi风格主题样式 */
.ruoyi-theme {
  // 深色主题变量
  --el-color-primary: #409EFF;
  --el-color-success: #67C23A;
  --el-color-warning: #E6A23C;
  --el-color-danger: #F56C6C;
  --el-color-info: #909399;
  
  // 背景色
  --el-bg-color: #f0f2f5;
  --el-bg-color-page: #f0f2f5;
  --el-bg-color-overlay: #ffffff;
  
  // 文字色
  --el-text-color-primary: #303133;
  --el-text-color-regular: #606266;
  --el-text-color-secondary: #909399;
  --el-text-color-placeholder: #C0C4CC;
  
  // 边框色
  --el-border-color: #DCDFE6;
  --el-border-color-light: #E4E7ED;
  --el-border-color-lighter: #EBEEF5;
  --el-border-color-extra-light: #F2F6FC;
}

/* 布局样式 */
.layout-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 主内容区域样式 */
.main-container {
  flex: 1;
  margin-left: 220px;
  padding: 20px;
  min-height: calc(100vh - 60px);
  background: #f0f2f5;
  transition: margin-left 0.3s;
  overflow-y: auto;
}

.main-container.collapse {
  margin-left: 64px;
}

.app-main {
  background: white;
  border-radius: 4px;
  padding: 20px;
  min-height: calc(100vh - 100px);
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.no-layout-container {
  flex: 1;
  overflow-y: auto;
}

/* 登录页面样式 */
.login-container {
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  
  .login-form {
    background: white;
    border-radius: 8px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    
    .login-title {
      text-align: center;
      margin-bottom: 30px;
      font-size: 24px;
      color: #303133;
      font-weight: bold;
    }
    
    .login-subtitle {
      text-align: center;
      margin-bottom: 30px;
      color: #909399;
    }
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-container {
    margin-left: 64px;
    padding: 10px;
    
    .app-main {
      padding: 15px;
    }
  }
  
  .login-form {
    width: 90% !important;
    margin: 0 20px;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-10 {
  margin-top: 10px;
}

.mb-10 {
  margin-bottom: 10px;
}

.ml-10 {
  margin-left: 10px;
}

.mr-10 {
  margin-right: 10px;
}

.p-20 {
  padding: 20px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}